package cn.jiyun.controller;

import cn.jiyun.dao.catalog.CatalogDTO;
import cn.jiyun.feign.CatalogFeign;
import cn.jiyun.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author 王晨
 * Date 2023/8/25
 */
@RestController
@RequestMapping("/catalog")
public class CatalogController {
    @Autowired
    private CatalogFeign catalogFeign;


    @RequestMapping("/findCatalog")//查询目录表
    public R findCatalog(CatalogDTO catalogDTO){
        return catalogFeign.findCatalog(catalogDTO);
    }

    @RequestMapping("/findSta")//点击变成已学
    public R findSta(Integer lid,Integer cid){
        return catalogFeign.findSta(lid,cid);
    }
    @RequestMapping("/findcatalogLogin")//查询已学表中是否有数据
    public R findcatalogLogin(Integer lid){
        return catalogFeign.findcatalogLogin(lid);
    }
    @RequestMapping("/finddel")//单击删除
    public R finddel(Integer cid){
        return catalogFeign.finddel(cid);
    }
    @RequestMapping("/findLesson")//添加完成后查询
    public R findLesson(Integer cid){
        return catalogFeign.findLesson(cid);
    }

}
